package com.sharing.library.controller;

import com.zhx.framework.util.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhanghaixuan
 * @create 2018/3/25-上午9:52
 **/
@RestController
@RequestMapping("/admin")
@Api(description="后台用户 只做登录")
public class AdminController {


    @PostMapping("/login")
    @ApiOperation(value="后台管理员登录", notes="后台管理员登录  用户名:admin 密码 sharing")
    public Result login(@RequestParam String username,@RequestParam String pwd)
    {
        if(username.equals("admin") && pwd.equals("sharing")){
            return Result.OK("");
        }else{
            return Result.Error(500,"用户名或者密码错误!");
        }
    }


}
